package GUI;

import javax.swing.JOptionPane;

public class Guishow {
	public static void main(String[] args) {
		String firstnum;
		String secondnum;
		int num1,num2;
		int product;
		firstnum = JOptionPane.showInputDialog("Enter first integer");
		secondnum = JOptionPane.showInputDialog("Enter second integer");
		try {
			num1 = Integer.parseInt(firstnum);
			num2 = Integer.parseInt(secondnum);
			product = num1 + num2;
			JOptionPane.showMessageDialog(null, "The sum is "+product,"Sum of Two Integers",JOptionPane.PLAIN_MESSAGE);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
